
<html >  
<head>  
    <title>test</title>  

  
</head>  
  
<body>  
	<form name='f1'>
		<input type="radio" name = 't' value="0" />
		<input type="radio" name = 't' value="1" />
		<input type="radio" name = 't' value="2" />
		<button type="submit" value="sub"> </button>
	</form>
	
</body>  
    <script type="text/javascript">
  	var form =document.forms['f1'];
  	form.onsubmit = function(){
  		var radios = this.t;
  		console.log(radios[0].value);
  		return false;
  	};
  	
  </script>
</html> 